package com.book.bookmanager.service;

import com.book.bookmanager.dao.userDao;
import com.book.bookmanager.pojo.Book;
import com.book.bookmanager.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class userServiceImpl implements userService {
    @Autowired
    private userDao ud;

    @Override
    public List<User> queryAll() {
        return ud.queryAll();
    }

    @Override
    public int add(User user) {
        return ud.add(user);
    }

    @Override
    public User queryByUser(String user) {
        return ud.queryByUser(user);
    }
}
